<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/29
 * Time: 21:53
 */

$process = new swoole_process(function (swoole_process $pro) {
    // todo
    $pro->exec('/usr/local/php7/bin/php', [__DIR__ . '/../server/http_server.php']);
}, false);

$pid = $process->start();
echo $pid . PHP_EOL;

swoole_process::wait();
/**
 *pstree -p PID 进程id（父进程）
 *
 * ps aft | grep http_server
 */